<template>
  <div>
    <el-button @click="getTestData">test接口，测试登录过期，设置过期时间为2小时，2小时后请求接口，将重新登录</el-button>
    <div>{{ data }}</div>
  </div>
</template>

<script setup>
import { test } from '@/api/test'
import { ref } from 'vue'
const data = ref('')
const getTestData = async () => {
  const { testData } = await test()
  data.value = testData
}
</script>

<style lang="scss" scoped></style>
